package org.common.utils.field;
import java.lang.reflect.Method;
import java.util.Collections;
import java.util.List;

/**
 * 方法表
 * @author zhouzhibing
 * @date 2025/8/7
 */
public class MethodTable {

    /**
     * 静态方法表
     */
    private static final MethodTable DEFAULT = new MethodTable();

    /**
     * set方法列表
     */
    private List<Method> setMethodList;

    /**
     * get方法列表
     */
    private List<Method> getMethodList;

    private MethodTable() {
        this.setMethodList = Collections.emptyList();
        this.getMethodList = Collections.emptyList();
    }

    public MethodTable(List<Method> setMethodList , List<Method> getMethodList) {
        this.setMethodList = Collections.unmodifiableList(setMethodList);
        this.getMethodList = Collections.unmodifiableList(getMethodList);
    }

    public List<Method> getSetMethodList() {
        return setMethodList;
    }

    public List<Method> getGetMethodList() {
        return getMethodList;
    }

    public static MethodTable getDefault() {
        return DEFAULT;
    }
}
